<div xmlns="http://www.w3.org/1999/xhtml"
     xmlns:s="http://jboss.com/products/seam/taglib"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:rich="http://richfaces.org/rich">



    <ul id="Navigation">
        <li><s:link id="company" view="/company.xhtml" value="О компании" propagation="none"/></li>

        <li><s:link id="pay_n_delivery" view="/pay_n_delivery.xhtml" value="Оплата и доставка" propagation="none"/></li>

        <li><s:link id="help" view="/help.xhtml" value="Помощь" propagation="none"/></li>

        <f:subview rendered="#{identity.loggedIn}" id="foo">
            <li id="page_orders"><s:link id="MyOrders" view="/showorders.xhtml" value="Мои Заказы" propagation="none"/>
            </li>
        </f:subview>

        <li>

<rich:modalPanel id="authpanel" width="200" height="156" left="600" top="70">
    <f:facet name="header">
        <h:panelGroup>
            <h:outputText value="#{messages.loginTitle}"/>
        </h:panelGroup>
    </f:facet>
    <f:facet name="controls">
        <h:panelGroup>
            <h:graphicImage value="/img/close.png" styleClass="hidelink" id="hidelink"/>
            <rich:componentControl for="authpanel" attachTo="hidelink" operation="hide" event="onclick"/>
        </h:panelGroup>
    </f:facet>

    <ui:include src="/WEB-INF/incl/login.xhtml" />
    
</rich:modalPanel>
            

            <h:outputLink value="#" id="enter-href" styleClass="enter-href" rendered="#{not identity.loggedIn}">
                Вход с паролем
                <rich:componentControl for="authpanel" attachTo="enter-href" operation="show" event="onclick"/>
            </h:outputLink>

             <h:form id="LogoutForm" style="display: inline;">
            <h:commandLink action="#{identity.logout}" id="exit-href" styleClass="exit-href" rendered="#{identity.loggedIn}">
                Выход
            </h:commandLink></h:form>
            <br /> 


        </li>

    </ul>

    

    <script type="text/javascript" language="JavaScript">
        function setClass(id, className) {
        var obj = document.getElementById(id);
        if (obj != null) {
        obj.className = className;
        }
        }
        setClass("page_" + "#{page}", "current");
    </script>


    <f:subview id="cart" rendered="#{!cart.isEmpty}">
        <div id="shopping-cart">
            <b>В вашей корзине</b><br/>
            #{cart.itemsQuantity} товар#{cart.ending} на<h:outputText value=" " />
            <h:outputText value="#{cart.subtotal}">
                <f:convertNumber type="currency" currencySymbol="руб." />
            </h:outputText>
            <h:form id="Cart">
                <h:commandButton id="Checkout" action="checkout" value="Оформить заказ"
                                 styleClass="formButton" style="width: 155px;"/>
            </h:form>
        </div>
    </f:subview>



    
    
</div>

